from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates
import os,sys
PveProject_router = APIRouter()
BASE_DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
path = os.path.join(BASE_DIR, 'app/templates')
templates = Jinja2Templates(directory=path)

@PveProject_router.get("/pve-Rgos/project/{topology}")
def get_index(request:Request,topology:str):
    return templates.TemplateResponse("project.html", {"request": request})
    # return RedirectResponse('/login')